home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
develop
/
libsrc11.arc
/
ERROWEE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-04-27
|
931b
|
42 lines
/* errowee.c 4.3 */
/*F****************************************************************************
FUNCTION NAME: errowee
ACTION: Erase row of EEPROM at offset into EEPROM provided by addr.
PARAMETERS:
addr: location of row in EEPROM to be erased.
RETURNS: (void)
******************************************************************************/
#define EROM_SIZE 512 /* Size of EEPROM */
#define ERASE_TIME 10 /* number of milliseconds to delay for erase */
#include <hc11/io.h>
#include <hc11/config.h>
#include <hc11/directives.h>
SMALL
void errowee(addr)
int addr; /* row to be erased */
{
HC11.PPROG = EELAT | ERASE | EEROW;
EEPROM[addr&(EROM_SIZE-1)] = 0;
HC11.PPROG = EELAT | ERASE | EEPGM | EEROW;
delay (ERASE_TIME); /* delay 10 milliseconds */
HC11.PPROG = EELAT | ERASE | EEROW;
HC11.PPROG = 0; /* enable reads of EEPROM */
} /* end of errowee */